#pragma once

#include <string>
class  XTcp
{
public:
	int CreateSocket();
	bool Bind(unsigned short port);
	XTcp Accept();
	int Recv(char* buf,int bufsize);
	int Send(const char *buf,int sendSize);
	void Close();
	XTcp();
	virtual ~XTcp();
	int sock = 0;
	unsigned short port = 0;
	//std::string ip;
	char ip[16];
};


